3.309 \(\int \cos ^4(e+f x) (a+b \sec ^2(e+f x))^p \, dx\)

Optimal. Leaf size=83 \[ \frac{\tan (e+f x) \left (a+b \tan ^2(e+f x)+b\right )^p \left (\frac{b \tan ^2(e+f x)}{a+b}+1\right )^{-p} F_1\left (\frac{1}{2};3,-p;\frac{3}{2};-\tan ^2(e+f x),-\frac{b \tan ^2(e+f x)}{a+b}\right )}{f} \]

[Out]

(AppellF1[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Tan[e + f*x]*(a + b + b*Tan[e + f*x
]^2)^p)/(f*(1 + (b*Tan[e + f*x]^2)/(a + b))^p)

________________________________________________________________________________________

Rubi [A]  time = 0.0808565, antiderivative size = 83, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {4146, 430, 429} \[ \frac{\tan (e+f x) \left (a+b \tan ^2(e+f x)+b\right )^p \left (\frac{b \tan ^2(e+f x)}{a+b}+1\right )^{-p} F_1\left (\frac{1}{2};3,-p;\frac{3}{2};-\tan ^2(e+f x),-\frac{b \tan ^2(e+f x)}{a+b}\right )}{f} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]^4*(a + b*Sec[e + f*x]^2)^p,x]

[Out]

(AppellF1[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Tan[e + f*x]*(a + b + b*Tan[e + f*x
]^2)^p)/(f*(1 + (b*Tan[e + f*x]^2)/(a + b))^p)

Rule 4146

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fre
eFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/
2), x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]

Rule 430

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^F
racPart[p])/(1 + (b*x^n)/a)^FracPart[p], Int[(1 + (b*x^n)/a)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n,
p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n, -1] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 429

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, -((b*x^n)/a), -((d*x^n)/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rubi steps

\begin{align*} \int \cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (a+b+b x^2\right )^p}{\left (1+x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\left (\left (a+b+b \tan ^2(e+f x)\right )^p \left (1+\frac{b \tan ^2(e+f x)}{a+b}\right )^{-p}\right ) \operatorname{Subst}\left (\int \frac{\left (1+\frac{b x^2}{a+b}\right )^p}{\left (1+x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{F_1\left (\frac{1}{2};3,-p;\frac{3}{2};-\tan ^2(e+f x),-\frac{b \tan ^2(e+f x)}{a+b}\right ) \tan (e+f x) \left (a+b+b \tan ^2(e+f x)\right )^p \left (1+\frac{b \tan ^2(e+f x)}{a+b}\right )^{-p}}{f}\\ \end{align*}

Mathematica [B]  time = 16.4021, size = 1912, normalized size = 23.04 \[ \text{result too large to display} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Cos[e + f*x]^4*(a + b*Sec[e + f*x]^2)^p,x]

[Out]

(3*(a + b)*AppellF1[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Cos[e + f*x]^3*(a + 2*b +
 a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-3 + p)*(a + b*Sec[e + f*x]^2)^p*Sin[e + f*x])/(f*(3*(a + b)*AppellF1
[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 2*(b*p*AppellF1[3/2, 3, 1 - p, 5/2, -Tan[e
 + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - 3*(a + b)*AppellF1[3/2, 4, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e +
f*x]^2)/(a + b))])*Tan[e + f*x]^2)*((3*(a + b)*AppellF1[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)
/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-2 + p))/(3*(a + b)*AppellF1[1/2, 3, -p, 3/2, -T
an[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 2*(b*p*AppellF1[3/2, 3, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[
e + f*x]^2)/(a + b))] - 3*(a + b)*AppellF1[3/2, 4, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*T
an[e + f*x]^2) - (6*a*(a + b)*p*AppellF1[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*(a +
 2*b + a*Cos[2*(e + f*x)])^(-1 + p)*(Sec[e + f*x]^2)^(-3 + p)*Sin[2*(e + f*x)]*Tan[e + f*x])/(3*(a + b)*Appell
F1[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 2*(b*p*AppellF1[3/2, 3, 1 - p, 5/2, -Tan
[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - 3*(a + b)*AppellF1[3/2, 4, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e
+ f*x]^2)/(a + b))])*Tan[e + f*x]^2) + (6*(a + b)*(-3 + p)*AppellF1[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan
[e + f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-3 + p)*Tan[e + f*x]^2)/(3*(a + b)*A
ppellF1[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 2*(b*p*AppellF1[3/2, 3, 1 - p, 5/2,
 -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - 3*(a + b)*AppellF1[3/2, 4, -p, 5/2, -Tan[e + f*x]^2, -((b*T
an[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2) + (3*(a + b)*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-3 +
 p)*Tan[e + f*x]*((2*b*p*AppellF1[3/2, 3, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e +
f*x]^2*Tan[e + f*x])/(3*(a + b)) - 2*AppellF1[3/2, 4, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]
*Sec[e + f*x]^2*Tan[e + f*x]))/(3*(a + b)*AppellF1[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a +
 b))] + 2*(b*p*AppellF1[3/2, 3, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - 3*(a + b)*Appell
F1[3/2, 4, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2) - (3*(a + b)*AppellF1[1/2
, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2
)^(-3 + p)*Tan[e + f*x]*(4*(b*p*AppellF1[3/2, 3, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] -
 3*(a + b)*AppellF1[3/2, 4, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Sec[e + f*x]^2*Tan[e + f
*x] + 3*(a + b)*((2*b*p*AppellF1[3/2, 3, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f
*x]^2*Tan[e + f*x])/(3*(a + b)) - 2*AppellF1[3/2, 4, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*
Sec[e + f*x]^2*Tan[e + f*x]) + 2*Tan[e + f*x]^2*(b*p*((-6*b*(1 - p)*AppellF1[5/2, 3, 2 - p, 7/2, -Tan[e + f*x]
^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(5*(a + b)) - (18*AppellF1[5/2, 4, 1 - p, 7/2,
 -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/5) - 3*(a + b)*((6*b*p*AppellF1[
5/2, 4, 1 - p, 7/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(5*(a + b)) -
 (24*AppellF1[5/2, 5, -p, 7/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/5)
)))/(3*(a + b)*AppellF1[1/2, 3, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 2*(b*p*AppellF1[3/2
, 3, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - 3*(a + b)*AppellF1[3/2, 4, -p, 5/2, -Tan[e
+ f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2)^2))

________________________________________________________________________________________

Maple [F]  time = 0.73, size = 0, normalized size = 0. \begin{align*} \int \left ( \cos \left ( fx+e \right ) \right ) ^{4} \left ( a+b \left ( \sec \left ( fx+e \right ) \right ) ^{2} \right ) ^{p}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)^4*(a+b*sec(f*x+e)^2)^p,x)

[Out]

int(cos(f*x+e)^4*(a+b*sec(f*x+e)^2)^p,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{4}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^4*(a+b*sec(f*x+e)^2)^p,x, algorithm="maxima")

[Out]

integrate((b*sec(f*x + e)^2 + a)^p*cos(f*x + e)^4, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{4}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^4*(a+b*sec(f*x+e)^2)^p,x, algorithm="fricas")

[Out]

integral((b*sec(f*x + e)^2 + a)^p*cos(f*x + e)^4, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)**4*(a+b*sec(f*x+e)**2)**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{4}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^4*(a+b*sec(f*x+e)^2)^p,x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e)^2 + a)^p*cos(f*x + e)^4, x)